package com.erp.util;

import java.util.ArrayList;

public class LanYaUtil {
    public static String ly_address(String name){
        String ly = "34:81:F4:CB:1D:11";
        switch (name){
            case "一号打印机" :
                ly = "34:81:F4:CB:1D:11";
                break;
            case "二号打印机" :
                ly = "34:81:F4:CB:F3:D7";
                break;
            case "三号打印机" :
                ly = "D8:47:8F:04:B5:96";
                break;
        }
        return ly;
    }
    /**
     * 获取蓝牙打印机名称列表
     */
    public static ArrayList<String> ly_names(){
        ArrayList<String> names = new ArrayList<>();
        names.add("一号打印机");
        names.add("二号打印机");
        names.add("三号打印机");
        return names;
    }
    /**
     * 获取选择的蓝牙下标
     */
    public static int ly_id(String address){
        int id = 0;
        switch (address){
            case "34:81:F4:CB:1D:11" :
                id = 0;
                break;
            case "34:81:F4:CB:F3:D7" :
                id = 1;
                break;
            case "D8:47:8F:04:B5:96" :
                id = 2;
                break;
        }
        return id;
    }
}

